import Vue from 'vue'
import App from './App'
import router from './router'
import axios from 'axios'
import store from './store'
import VideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
import { Uploader,Collapse,CollapseItem} from 'vant';
import 'vant/lib/index.css';
Vue.use(Uploader);
Vue.use(Collapse);
Vue.use(CollapseItem);
import {
  fetchGet,
  fetchPost,
  fetchPut
} from './untils/axiosConfig'

import {
  Button,
  Cell,
  Tabbar,
  TabItem,
  Navbar,
  Swipe,
  SwipeItem,
  Header,
  Loadmore,
  TabContainer,
  TabContainerItem,
  Search,
  Field,
  DatetimePicker,
  Picker,
  Radio,
  Popup,
  Switch,
  Checklist,
  Actionsheet,
  Spinner
} from 'mint-ui'
import 'lib-flexible'
// 引入字体图标
import './assets/iconfont/iconfont.css'

Vue.use(VideoPlayer)
Vue.prototype.$http = axios
Vue.prototype.$get = fetchGet
Vue.prototype.$post = fetchPost
Vue.prototype.$put = fetchPut

Vue.config.productionTip = false;
Vue.component(Radio.name, Radio);
Vue.component(Spinner .name, Spinner);
Vue.component(Actionsheet.name, Actionsheet);
Vue.component(Checklist.name, Checklist);
Vue.component(Popup.name, Popup);
Vue.component(Switch.name, Switch);
Vue.component(Picker.name, Picker);
Vue.component(DatetimePicker.name, DatetimePicker);
Vue.component(Search.name, Search);
Vue.component(Field.name, Field);
Vue.component(Tabbar.name, Tabbar);
Vue.component(TabItem.name, TabItem);
Vue.component(Navbar.name, Navbar);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Cell.name, Cell);
Vue.component(Button.name, Button);
Vue.component(Header.name, Header);
Vue.component(Loadmore.name, Loadmore);
Vue.component(TabContainer.name, TabContainer);
Vue.component(TabContainerItem.name, TabContainerItem);

/* eslint-disable no-new */

new Vue({
  el: '#app',
  router,
  store,
  components: {
    App
  },
  template: '<App/>'
})
